package com.example.spring.ai.tools;

import com.example.spring.ai.entity.Customer;
import org.springframework.ai.tool.annotation.Tool;

import java.util.HashMap;
import java.util.Map;

public class CustomerTools {
    @Tool(description = "Retrieve customer information",
            resultConverter = CustomToolCallResultConverter.class)
    Customer getCustomerInfo(Long id) {
        Map<Long, Customer> map = new HashMap<>();

        map.put(1L, new Customer("张三", 18));
        map.put(2L, new Customer("李四", 19));

        return map.get(id);
    }
}
